home *** CD-ROM | disk | FTP | other *** search
/ MacFormat UK 76 / MF_UK_76_1.iso / Education Feature / MicroWorlds 2.03 Try Me / MicroWorlds 2.03 Try Me.rsrc / TEXT_594_ifelse.txt < prev    next >
Encoding:
Text File  |  1998-05-08  |  571 b   |  19 lines

  1. ifelse true-or-false instruction-list1 
  2.           instruction-list2
  3.  
  4. Runs the first instruction list if the condition is true. Runs the second instruction list if the condition is false. See if.
  5.  
  6. Example: 
  7.  
  8. ifelse colorunder = 15 
  9.        [fd 50]
  10.        [bk 50]
  11.  
  12. This instruction can be used to get an answer to a question dialog box. If the answer is not empty, it is displayed in a text box. In a procedure, the ifelse instruction can be typed on many lines to add clarity:
  13.  
  14. to insist
  15. question [Your name please...]
  16. ifelse empty? answer 
  17.     [insist]
  18.     [settext1 answer]
  19. end